home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#)nodes.c 1.3 7/9/87
- */
- #include "assert.h"
- #include "nodes.h"
- #include "scan.h"
- #include "tagNames.c"
- #include "system.h"
-
- NodePtr F_NewNode(T, N)
- Tag T;
- int N;
- {
- register NodePtr New;
- register int firstChild;
- firstChild = (int)T <= (int)LASTZEROLOCALS ? 0 :
- (int)T <= (int)LASTONELOCAL ? 1 :
- (int)T <= (int)LASTTWOLOCALS ? 2 : 3;
- New = (NodePtr) calloc (1,
- (unsigned)(BODYSIZE + ((N)+firstChild) * sizeof(NodePtr)));
- New->tag = T;
- New->maxChildren = N+firstChild;
- New->firstChild = New->nChildren = firstChild;
- New->lineNumber = nextLineNumber;
- return(New);
- }
-
- void initializeNodes()
- {
- NodePtr p = NULL;
- assert (sizeof(Address) == 4);
- assert ((char *)&(p->b.invoc.target) - (char *)&p->b.invoc.opNumber == 8);
-
- }
-